package com.controller;

import com.mail.MailSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    MailSendService mailSendService;

    /**
     * 成验证码并发送到对应邮箱，成功true，失败false
     *
     * @param email
     * @return
     */
    @GetMapping("/{email}/{code}")
    public boolean create(@PathVariable String email, @PathVariable String code) {
        System.out.printf(email +"-->"+code);
        return true;
        //return mailSendService.send(email, code);
    }

}
